<template>
  <component :is="component" :type="type"></component>
</template>

<script lang="ts" setup>
import type { Props } from './type'

import components from '../components'

const PROPS = withDefaults(defineProps<Props>(), {
  type: 'text'
})

const component = computed(() => {
  return components[PROPS.type]
})
</script>

<style lang="scss"></style>
